<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/static/layui/css/layui.css">
    <script src="/static/js/echarts.min.js"></script>
    <link rel="stylesheet" href="/static/font/iconfont.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_513824_1f6wmm4cbmwh4cxr.css">
    <title>虚拟货币比价系统</title>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">
            虚拟货币比价系统
        </div>
        <!-- 头部区域（可配合layui已有的水平导航） -->

        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img class="layui-nav-img" src="/static/img/group.png">
                    <$ username $>
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;" onclick="changePwd()"> <i class="iconfont icon-xiugaimima"
                                                                         style="margin-right: 10px"></i>修改密码</a>
                    </dd>
                    <dd><a href="javascript:;" onclick="logout()"><i class="iconfont icon-tuichu"
                                                                     style="margin-right: 10px"></i>退出登录</a></dd>
                </dl>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-this"><a href="javascript:;" target="/compare"><i
                        class="iconfont icon-peizhi"
                        style="margin-right: 20px"></i>数据对比</a>
                </li>


                <li class="layui-nav-item" style="visibility: hidden">
                    <a href="javascript:;">
                        <i class="iconfont icon-shujubaobiao"
                           style="margin-right: 20px"></i>考勤统计报表</a>
                    <dl class="layui-nav-child">
                        <dd>
                            <a href="javascript:;" target="/report/detail">
                                <i class="iconfont icon-mingxi" style="margin-right: 20px"></i>签到明细表
                            </a>
                        </dd>
                        <dd>
                            <a href="javascript:;" target="/report/person">
                                <i class="iconfont icon-person"
                                   style="margin-right: 20px"></i>个人签到率
                            </a>
                        </dd>
                        <dd>
                            <a href="javascript:;" target="/report/department">
                                <i class="iconfont icon-bumen"
                                   style="margin-right: 20px"></i>部门签到率
                            </a>
                        </dd>
                    </dl>
                </li>

            </ul>
        </div>
    </div>

    <div class="layui-body" style="background: #f7f7f7;overflow: hidden;">
        <iframe id="iframe" src='' height="100%" width="100%" frameborder='no' border='0' marginwidth='0'
                marginheight='0' scrolling='yes' allowtransparency='yes'></iframe>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        ©  2017 markgu.top  QQ:734432004
    </div>
</div>
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="/static/layui/layui.js"></script>
<script>
  var $;
  //JavaScript代码区域
  layui.use('element', function () {
    $ = layui.jquery;
    var ip_addr = document.location.hostname;

    var element = layui.element;
    $("#iframe").attr('src', "/compare?x-tm-token="
      + localStorage.tmToken);

    $(function () {
      $('.layui-nav-tree li').click(function () {
        var $this = $(this),
          _clickTab = $this.find('a').attr('target');
        if (_clickTab) {
          $("#iframe").attr('src', _clickTab + "?x-tm-token="
            + localStorage.tmToken);
        }
      });
      $('.layui-nav-tree dd').click(function () {
        var $this = $(this),
          _clickTab = $this.find('a').attr('target');
        if (_clickTab) {
          $("#iframe").attr('src', _clickTab + "?x-tm-token="
            + localStorage.tmToken);
        }
      });
    });
  });

  function changePwd() {
    $("#iframe").attr('src', "/admin/changepwd?x-tm-token="
      + localStorage.tmToken);
  }

  function logout() {
    localStorage.tmToken = '';
    window.location.href = '/admin/login';
  }


</script>
</body>

</html>